package com.xsomnus.network_programming.netty.heartbeat;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.timeout.IdleStateHandler;

/**
 * @author 叶小夏
 * @since 2019-08-16 17:18
 */
public class ClientHandlerInitializer extends ChannelInitializer<SocketChannel> {

    public ClientHandlerInitializer(TcpClient tcpClient) {

    }

    @Override
    protected void initChannel(SocketChannel ch) throws Exception {
        ch.pipeline().addLast(new IdleStateHandler(10, 15, 10));
    }
}
